import QtQuick 2.0
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import "models"

Item {
    id: root
    RuntimeData {
        id: id_runtime_data
        onRuntime_cell_tempChanged: {
            console.log("id_runtime_data Runtime_cell_temp:",
                        id_runtime_data.runtime_cell_temp.value)
        }
    }
    Text {
        id: page1
        text: qsTr("页面1")
        anchors.horizontalCenter: root.horizontalCenter
        anchors.top: root.top
    }
    GridLayout {
        anchors.centerIn: root
        columns: 2
        rows: 2
        Text {
            id: temp_indicate
            text: qsTr("运行温度（从本地页面获取）：")
        }
        Text {
            id: temp
            text: id_runtime_data.runtime_cell_temp.value
        }
        Text {
            id: temp_indicate2
            text: qsTr("运行温度（从全局变量获取）：")
        }
        Text {
            id: temp2
            text: Collections.runtimeData.runtime_cell_temp.value
        }
    }
}
